import http from "@/http";
import type { MenuModel } from "./MenuModel";
export const getParentMenuListApi = () => {
  return http.get("/api/menu/getParent");
};
export const addMenuApi = (data: MenuModel) => {
  return http.post("/api/menu/add", data);
};
export const getMenuListApi = () => {
  return http.get("/api/menu/list");
};
export const updateMenuApi = (data: MenuModel) => {
  return http.put("/api/menu/update", data);
};
export const deleteMenuApi = (id: string) => {
  return http.delete(`/api/menu/delete/${id}`);
};
export const getMenuDetailApi = (userId: string) => {
  return http.get(`/api/menu/getMenuList`, { userId: userId });
};
